'\" te
.\"  Copyright 1989 AT&T  Copyright (c) 1997, Sun Microsystems, Inc.  All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH SYNC 2 "Jul 5, 1990"
.SH NAME
sync \- update super block
.SH SYNOPSIS
.LP
.nf
#include <unistd.h>

\fBvoid\fR \fBsync\fR(\fBvoid\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBsync()\fR function writes all information in memory that should be on
disk, including modified super blocks, modified inodes, and delayed block I/O.
.sp
.LP
Unlike \fBfsync\fR(3C), which completes the writing before it returns,
\fBsync()\fR schedules but does not necessarily complete the writing before
returning.
.SH USAGE
.sp
.LP
The \fBsync()\fR function should be used by applications that examine a file
system, such as \fBfsck\fR(8), and \fBdf\fR(8), and is mandatory before
rebooting.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Standard
.TE

.SH SEE ALSO
.sp
.LP
.BR fsync (3C),
.BR attributes (7),
.BR standards (7),
.BR df (8),
.BR fsck (8)
